package SequencerStrategies;

import java.io.Serializable;

import javax.sound.midi.MidiEvent;
import javax.sound.midi.Sequencer;
import javax.sound.midi.ShortMessage;

public abstract class SequencerStrategie implements Serializable{
	
	/**
	 * Genere une piste aleatoire et l'associe au sequenceur
	 * @param sequenceur Objet qui va contenir la piste
	 */
	public abstract void sequencer(Sequencer sequenceur);
	
	protected MidiEvent makeEvent(int comd, int can, int un, int deux, int tic) {
		MidiEvent evenement = null;
		try {
			ShortMessage a = new ShortMessage();
			a.setMessage(comd, can, un, deux);
			evenement = new MidiEvent(a, tic);

		}catch(Exception e) { }
		return evenement;
	}

}
